﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FooFun.Web.Controls;
using FAQFrameworks;
using FooFun.DataElements.Dtos;

namespace FooFun.Web.Controls
{
    public class ListLastReplyAboutUser : DataElementControl
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            UserManager userManager = new UserManager();

            DateTime time = userManager.GetLastVisiteTime(FAQContext.Current.User.AccountId);

            EventManager eventManager = new EventManager();
            IDataElement de = eventManager.ListLastReplyEventAboutUser(
                FAQContext.Current.User.AccountId,
                time);

            this.DataElement = de;

        }
    }
}
